﻿/***************************************************************************
 创建者: 华磊
 开始时间: 2019.9.20
 copyright: (C) 华友高科
 ***************************************************************************/
#include "mappath.h"

MapPath::MapPath(int _id, std::string _name, int _start, int _end, Map_Path_Type _type, double _length,
                 double _p1x, double _p1y, double _p2x, double _p2y, bool _locked, double _speed,
                 double _p1x_real, double _p1y_real, double _p2x_real, double _p2y_real):
    MapSpirit(_id,_name,Map_Sprite_Type_Path),
    start(_start),
    end(_end),
    length(_length),
    path_type(_type),
    p1x(_p1x),
    p1y(_p1y),
    p2x(_p2x),
    p2y(_p2y),
    locked(_locked),
    speed(_speed),
    p1x_real(_p1x_real),
    p1y_real(_p1y_real),
    p2x_real(_p2x_real),
    p2y_real(_p2y_real)
{
    barrierType=E_PATH_BARRIER_TYPE_COMMON;
    isBackMove=false;
}

MapPath::~MapPath()
{

}

MapSpirit *MapPath::clone()
{
    MapPath *p = new MapPath(getId(),getName(),getStart(),getEnd(),getPathType(),getLength()
                             ,getP1x(),getP1y(),getP2x(),getP2y(),getLocked(),getSpeed(),
                             getP1x_real(),getP1y_real(),getP2x_real(),getP2y_real());
    return p;
}

